<%@page import="java.util.List"%>
<%@page import="net.bitacademy.java23.vo.Photo"%>
<%@page import="net.bitacademy.java23.vo.Center"%>
<%@page import="java.util.ArrayList"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%
Center center = (Center) request.getAttribute("center");
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>교육장 변경</title>
</head>
<body>
<form action='updateForm.do' method='post'
	enctype="multipart/form-data">
번호: <input type='text' name='centerNo' readonly 
		value='<%=center.getCenterNo()%>'><br>
교육장이름: <input type='text' name='name' 
		value='<%=center.getName()%>'><br>
전화: <input type='text' name='tel' 
		value='<%=center.getTel()%>'><br>
주소: <input type='text' name='addr' 
		value='<%=center.getAddr()%>'><br>
<%
Photo photo = null;
List<Photo> photoList = center.getPhotoList();
String originFilePath = "";
for (int i = 0; i < 3; i++) {
	if (i < photoList.size()) {
		photo = photoList.get(i);
		originFilePath = photo.getFilePath();%>
<img src="../upload/<%=originFilePath%>" width="60" height="100">
	<%} else {
		originFilePath = "";
	}%>
<input type="hidden" name="photo<%=i+1%>Origin" value="<%=originFilePath%>">
<input type="file" name="photo<%=i+1%>"><br>
<%}%>		
<input type='submit' value='변경'><br>
</form>
<a href='list.do'>목록</a>
</body>
</html>






